//导入Vue核心包
import Vue from 'vue';
//app.vue的Vue对象
import App from './App.vue';
//3.0将vue-router集成到这个项目中
import vueRouter from 'vue-router';
//3.0将VueRouter绑定到vue对象上
Vue.use(vueRouter)
import home from './component/Home.vue';
import shopcar from './component/shopcar/car.vue';
import newslist from './component/news/newslist.vue';
import newsinfo from './component/news/newsinfo.vue';
import photolist from './component/photo/photolist.vue';
import photoinfo from './component/photo/photoinfo.vue';
import goodslist from './component/goods/goodslist.vue';
import goodsinfo from './component/goods/goodsinfo.vue';
import goodsdesc from './component/goods/goodsdesc.vue';
import goodscomment from './component/goods/goodscomment.vue';




var router1 = new vueRouter({
	linkActiveClass:'mui-active',
	routes:[
	{path:'/home',component:home},
	{path:'/shopcar',component:shopcar},
	{path:'/news/newslist',component:newslist},
	{path:'/news/newsinfo/:id',component:newsinfo},
	{path:'/photo/photolist',component:photolist},
	{path:"/photo/photoinfo/:id",component:photoinfo},
	{path:"/goods/goodslist",component:goodslist},
	{path:"/goods/goodsinfo/:id",component:goodsinfo},
	{path:"/goods/goodsdesc/:id",component:goodsdesc},
	{path:"/goods/goodscomment/:id",component:goodscomment},
	

	]
})
//4.0 注册mint-ui
////导入样式
import 'mint-ui/lib/style.min.css';
import mintui from 'mint-ui';

Vue.use(mintui);

//导入当前系统的样式
import '../statics/mui/css/mui.css';
import '../statics/css/site.css'

//7.0将vue-resource绑定在vue是上
import vueResource from 'vue-resource';
Vue.use(vueResource);
//8.使用图片预览组件
import VuePreview from 'vue-preview';
Vue.use(VuePreview);
//9.懒加载
//10.轮播图

// 5.0渲染
// 时间过滤器
import moment from 'moment';
Vue.filter('datefmt',function(input,fmtstring){	
	return moment(input).format(fmtstring);
})

new Vue ({
	el:'#app',
	router:router1,
	// render:function(create){create(App)}
	// 	参数     函数体
	render:c=>c(App)//es6的函数写法=>:goes to 语法
	//render:{c}=>{c(App);} 多个参数 或多个函数体时的语法
})
